<?php include_once("header.html")?>
<script type="text/javascript" src="<?php echo $www_site_url?>/public/js/PCASClass.js"></script>

<div id="wrap">  <br />
<?php include_once("home_left.html")?>
    <div class="admincontent">

	    <div id="tabsD" style="width:100%">
		  <ul>
		    <li <?php if($type=='contact') echo 'class="on"';?>><a href="/index.php/home/mydetail/contact"><span><?php echo lang('contact')?></span></a></li>
		    <li <?php if($type=='extinfo') echo 'class="on"';?>><a href="/index.php/home/mydetail/extinfo" ><span><?php echo lang('profiles')?></span></a></li>
		    <li <?php if($type=='other') echo 'class="on"';?>><a href="/index.php/home/mydetail/other" ><span><?php echo lang('diningcustoms')?></span></a></li>
		    <li <?php if($type=='payment') echo 'class="on"';?>><a href="/index.php/home/mydetail/payment" ><span><?php echo lang('payments')?></span></a></li>
		    <li <?php if($type=='upload') echo 'class="on"';?>><a href="/index.php/home/mydetail/upload" ><span><?php echo lang('uploadface')?></span></a></li>
		    <li><a href="/index.php/home/resetpwd" ><span><?php echo lang('resetpwd')?></span></a></li>
		  </ul>
		</div>

<div class="clear"></div>
<FORM name="editform" id="editform" method="POST" onsubmit="return checkOnSubmit('editform', rules);" <?php if($type=='upload'){ ?> enctype="multipart/form-data"<?php }?> >
<input type="hidden" name="action" value="home">
<input type="hidden" name="op" value="updateuserdetail">
<input type="hidden" name="type" id="t" value="<?php echo $type?>">
<input type="hidden" name="user_id" value="<?php echo $userinfo['user_id'];?>">
<input type="hidden" name="f" value="user">
<?php if($type=='contact'){ ?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="regInfo">
<TR>
<TD width="40%" class="text"></TD>
<TD width="60%"><div id="msg" style="margin:0 auto;"></div></TD>
</TR>

<TR>
<TD width="40%" class="text">*<?php echo lang('real_name')?>:</TD>
<TD width="60%"><div id="errorsDiv_realname"></div><INPUT class="input" style="color:#ccc" type="text" name="realname" value="<?php echo $userinfo['realname']?>" id="realname" readonly /></TD>
</TR>
<TR>
<TD class="text">*<?php echo lang('gender')?>:</TD>
<TD><div id="errorsDiv_gender"></div><select name="gender" id="gender">
<option value="0"><?php echo lang('selected')?></option>
			<option value="1" <?php if('1'==$userinfo['gender']) echo 'selected="selected"';?>><?php echo lang('boy')?></option>
			<option value="2" <?php if('2'==$userinfo['gender']) echo 'selected="selected"';?>><?php echo lang('girl')?></option>
			</select>
 </TD>
</TR>
<TR><TD class="text">*<?php echo lang('email')?>:</TD>
<TD><div id="errorsDiv_email"></div><INPUT class="input" style="color:#ccc" type="text" name="email" value="<?php echo $userinfo['user_email']?>" id="email"  readonly/></TD>
</TR>
<TR><TD class="text">*<?php echo lang('mobile')?>:</TD>
<TD><div id="errorsDiv_mobile"></div><INPUT class="input" type="text" name="mobile" value="<?php echo $userinfo['mobile']?>" id="mobile" /></TD>
</TR>
<TR>
<TD class="text"><?php echo lang('workphone')?>:</TD>
<TD><div id="errorsDiv_workphone"></div><INPUT class="input" type="text" name="workphone" value="<?php echo $userinfo['workphone']?>" id="workphone"/></TD>
</TR>
<TR>
<TD class="text"><?php echo lang('homephone')?>:</TD>
<TD><div id="errorsDiv_homephone"></div><INPUT class="input" type="text" name="homephone" id="homephone" value="<?php echo $userinfo['homephone']?>" /></TD>
</TR>

<TR>
<TD class="text">QQ:</TD>
<TD><div id="errorsDiv_qq"></div><INPUT class="input" type="text" name="qq" id="qq" value="<?php echo $userinfo['qq']?>" /></TD>
</TR>
<TR>
<TD class="text">MSN:</TD>
<TD><div id="errorsDiv_msn"></div><INPUT class="input" type="text" name="msn" id="msn" value="<?php echo $userinfo['msn']?>" /></TD>
</TR>
<TR>
<TD class="text">*<?php echo lang('living_city')?>:</TD>
<TD><div id="errorsDiv_city"></div>
<select name="province"></select><select name="city"></select></TD>
</TR>
<TR>
<TD class="text">*<?php echo lang('district')?>:</TD>
<TD><div id="errorsDiv_area"></div>
<select name="area"></select></TD>
</TR>

<TR>
<TD class="text"><?php echo lang('postaddress');?>:</TD>
<TD><div id="errorsDiv_postaddress"></div><INPUT class="input" type="text" name="postaddress" id="postaddress" value="<?php echo $userinfo['postaddress']?>" /></TD>
</TR>

  <tr>
    <td class="text">&nbsp;</td>

    <td><br /><br />
          <input name="button" type="submit" class="btn" id="button" value="<?php echo lang('save')?>" />
    </td>
  </tr>
</table>
<script>
new PCAS("province","city","area","<?php echo $userinfo['province']?>","<?php echo $userinfo['city']?>","<?php echo $userinfo['area']?>");

</script>
<?php }?>
<?php if($type=='extinfo'){ ?>

<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="regInfo">
<TR>
<TD width="40%" class="text"></TD>
<TD width="60%"><div id="msg" style="margin:0 auto;"></div></TD>
</TR><TR>


<TR>
<TD class="text">*<?php echo lang('birthday')?>:</TD>
<TD><div id="errorsDiv_birthdateyear"></div><select name="birthdateyear" id="birthdateyear">
			<option value="">--</option>
			<?php for ($i=1921;$i<2000;$i++){?>
			<option value="<?php echo $i;?>" <?php if($i==$userinfo['year']) echo 'selected="selected"';?>><?php echo $i;?></option>
			<?php }?>

		</select><?php echo lang('year')?><select name="birthdatemonth" id="birthdatemonth">
		<option value="">--</option>
		<?php for ($i=1;$i<=12;$i++){?>
			<option value="<?php echo $i;?>" <?php if($i==$userinfo['month']) echo 'selected="selected"';?>><?php echo $i;?></option>
			<?php }?>


		</select><?php echo lang('month')?><select name="birthdateday" id="birthdateday">
<option value="">--</option>
				<?php for ($i=1;$i<=31;$i++){?>
			<option value="<?php echo $i;?>" <?php if($i==$userinfo['day']) echo 'selected="selected"';?>><?php echo $i;?></option>
			<?php }?>

		</select><?php echo lang('day')?></TD>
</TR>
<TR>
<TD class="text">*<?php echo lang('marriage')?>:</TD>
<TD><div id="errorsDiv_maritalstatus"></div><select name="maritalstatus" id="maritalstatus">
<option value=""><?php echo lang('selected')?></option>
			<option value="M" <?php if('M'==$userinfo['marital']) echo 'selected="selected"';?>><?php echo lang('married')?></option>
			<option value="S" <?php if('S'==$userinfo['marital']) echo 'selected="selected"';?>><?php echo lang('single')?></option>
			<option value="D" <?php if('D'==$userinfo['marital']) echo 'selected="selected"';?>><?php echo lang('divorced')?></option>
			</select>
 </TD>
</TR>
<TR>
<TD class="text">*<?php echo lang("quan_of_children");?>:</TD>
<TD><div id="errorsDiv_children"></div>
<select name="children" id="children">
<?php for ($i=0;$i<=5;$i++){?>
			<option value="<?php echo $i;?>" <?php if($i==$userinfo['children']) echo 'selected="selected"';?>><?php echo $i;?></option>
			<?php }?>
</select>
 </TD>
</TR>
<TR>
<TD class="text">*<?php echo lang("nationality");?>:</TD>
<TD><div id="errorsDiv_nationality"></div><INPUT class="input" type="text" name="nationality" id="nationality" value="<?php echo $userinfo['nationality']?>" /></TD>
</TR>
<TR>
<TD class="text"><?php echo lang("birthplace");?>:</TD>
<TD><div id="errorsDiv_birthplace"></div><INPUT class="input" type="text" name="birthplace" id="birthplace" value="<?php echo $userinfo['birthplace']?>" /></TD>
</TR>
<TR>
<TD class="text">*<?php echo lang("job_position");?>:</TD>
<TD><div id="errorsDiv_occupation"></div><INPUT class="input" type="text" name="occupation" id="occupation" value="<?php echo $userinfo['occupation']?>" /></TD>
</TR>
<TR>
<TD class="text"><?php echo lang("company_name");?></TD>
<TD><div id="errorsDiv_companyname"></div><INPUT class="input" type="text" name="companyname" id="companyname" value="<?php echo $userinfo['company_name']?>" /></TD>
</TR>
<TR>
<TD class="text">*<?php echo lang("salary");?>:</TD>
<TD><div id="errorsDiv_householdincome"></div>
<select name="householdincome" id="householdincome" >
					<option value="" ><?php echo lang('selected')?></option>
					<option value="1" <?php if(1==$userinfo['householdincome']) echo 'selected="selected"';?>>&lt; 3,000</option>
					<option value="2" <?php if(2==$userinfo['householdincome']) echo 'selected="selected"';?>>3,000-6,000</option>
					<option value="3" <?php if(3==$userinfo['householdincome']) echo 'selected="selected"';?>>6,000-9,000</option>
					<option value="4" <?php if(4==$userinfo['householdincome']) echo 'selected="selected"';?>>9,000-12,000</option>
					<option value="5" <?php if(5==$userinfo['householdincome']) echo 'selected="selected"';?>>12,000-15000</option>
					<option value="6" <?php if(6==$userinfo['householdincome']) echo 'selected="selected"';?>>15,000-30,000</option>
					<option value="7" <?php if(7==$userinfo['householdincome']) echo 'selected="selected"';?>> > 30,000</option>
</select>
 </TD>
</TR>
<TR>
<TD class="text">*<?php echo lang("education");?>:</TD>
<TD><div id="errorsDiv_education"></div><select name="education" id="education">
<option value=""><?php echo lang('selected')?></option>
					<option value="1" <?php if(1==$userinfo['education']) echo 'selected="selected"';?>><?php echo lang("middle_school");?></option>
					<option value="2" <?php if(2==$userinfo['education']) echo 'selected="selected"';?>><?php echo lang("technical_secondary");?></option>
					<option value="3" <?php if(3==$userinfo['education']) echo 'selected="selected"';?>><?php echo lang("junior_college");?> </option>
					<option value="4" <?php if(4==$userinfo['education']) echo 'selected="selected"';?>><?php echo lang("master_degree");?></option>
					<option value="5" <?php if(5==$userinfo['education']) echo 'selected="selected"';?>><?php echo lang("doctor_degree");?></option>

				</select></TD>
</TR>
<TR>
<TD class="text">*<?php echo lang("have_own_car");?></TD>
<TD><div id="errorsDiv_havecar"></div><select name="havecar" id="havecar">
<option value=""><?php echo lang('selected')?></option>
					<option value="1" <?php if(1==$userinfo['havecar']) echo 'selected="selected"';?>>Yes</option>
					<option value="2" <?php if(2==$userinfo['havecar']) echo 'selected="selected"';?>>No</option>

				</select></TD>
</TR>
<TR>
<TD class="text">*<?php echo lang("other_language");?></TD>
<TD><div id="errorsDiv_otherlanguage"></div>
<INPUT class="input" type="text" name="otherlanguage" id="otherlanguage" value="<?php echo $userinfo['otherlanguage']?>" />
</TD>
</TR>
<TR>
<TD class="text">*<?php echo lang("have_been_mystery_shopper")?></TD>
<TD><div id="errorsDiv_been_mysteryshopper"></div><select name="been_mysteryshopper" id="been_mysteryshopper">
<option value="0"><?php echo lang('selected')?></option>
					<option value="1" <?php if(1==$userinfo['been_mysteryshopper']) echo 'selected="selected"';?>>Yes</option>
					<option value="2" <?php if(2==$userinfo['been_mysteryshopper']) echo 'selected="selected"';?>>No</option>

				</select></TD>
</TR>

<TR>
<TD class="text">*<?php echo lang("how_do_you_know_spot");?> </TD>
<TD><div id="errorsDiv_hearabout"></div>
<select name="hearabout" id="hearabout">
<option value="0"><?php echo lang('selected')?></option>
			<option value="1" <?php if(1==$userinfo['hearabout']) echo 'selected="selected"';?>><?php echo lang('introduced_by_friends')?></option>
			<option value="2" <?php if(2==$userinfo['hearabout']) echo 'selected="selected"';?>><?php echo lang('internet_advertisement')?></option>
			<option value="3" <?php if(3==$userinfo['hearabout']) echo 'selected="selected"';?>><?php echo lang('outdoor_advertising')?>  </option>
			<option value="4" <?php if(4==$userinfo['hearabout']) echo 'selected="selected"';?>><?php echo lang('newspaper')?></option>
			<option value="5" <?php if(5==$userinfo['hearabout']) echo 'selected="selected"';?>><?php echo lang('television')?></option>

			</select></TD>
</TR>
<TR>
<TD class="text"><?php echo lang("receive_newsletter");?> </TD>
<TD><div id="errorsDiv_newletters"></div><select name="newletters" id="newletters">
<option value="0"><?php echo lang('selected')?></option>
			<option value="1" <?php if(1==$userinfo['newletters']) echo 'selected="selected"';?>>Yes</option>
			<option value="2" <?php if(2==$userinfo['newletters']) echo 'selected="selected"';?>>No</option>
			</select></TD>
</TR>
<tr>
    <td class="text">&nbsp;</td>

    <td><br />
          <br />
          <input name="button2" type="submit" class="btn" id="button2" value="<?php echo lang('save')?>" />
   </td>
  </tr>
</table>

<?php }?>


<?php if($type=='other'){ ?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="regInfo">
<TR>
<TD width="50%" class="text"></TD>
<TD width="50%"><div id="msg" style="margin:0 auto;"></div></TD>
</TR>
<TR>
<TD class="text"><b><?php echo lang("general_dining");?></b></TD>
<TD></TD>
</TR>
<TR>
<TD class="text"><?php echo lang("usual_dining_custom");?></TD>
<TD><div id="errorsDiv_eatwithwho"></div>
<select name="eatwithwho" id="eatwithwho">
<option value="0"><?php echo lang('selected')?></option>
			<option value="1" <?php if(1==$userinfo['eatwithwho']) echo 'selected="selected"';?>><?php echo lang("individual");?></option>
			<option value="2" <?php if(2==$userinfo['eatwithwho']) echo 'selected="selected"';?>><?php echo lang("with_family");?></option>
			<option value="3" <?php if(3==$userinfo['eatwithwho']) echo 'selected="selected"';?>> <?php echo lang("with_friends");?></option>
			<option value="4" <?php if(4==$userinfo['eatwithwho']) echo 'selected="selected"';?>> <?php echo lang("with_colleagues");?></option>
			<option value="5" <?php if(5==$userinfo['eatwithwho']) echo 'selected="selected"';?>> <?php echo lang("with_clients");?></option>
			</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("orderbyphone");?></TD>
<TD><div id="errorsDiv_eatbooking"></div>
<select name="eatbooking" id="eatbooking">
<option value="0"><?php echo lang('selected')?></option>
			<option value="1" <?php if(1==$userinfo['eatbooking']) echo 'selected="selected"';?>>Yes</option>
			<option value="2" <?php if(2==$userinfo['eatbooking']) echo 'selected="selected"';?>>No</option>
			</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("enjoy_vip_card");?></TD>
<TD><div id="errorsDiv_eatvipcard"></div>
<select name="eatvipcard" id="eatvipcard">
<option value="0"><?php echo lang('selected')?></option>
			<option value="1" <?php if(1==$userinfo['eatvipcard']) echo 'selected="selected"';?>>Yes</option>
			<option value="2" <?php if(2==$userinfo['eatvipcard']) echo 'selected="selected"';?>>No</option>
			</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("primary_to_restaurant");?></TD>
<TD><div id="errorsDiv_dinnerhall"></div>
<select name="dinnerhall" id="dinnerhall">
<option value="0"><?php echo lang('selected')?></option>
			<option value="1" <?php if(1==$userinfo['dinnerhall']) echo 'selected="selected"';?>><?php echo lang("environment_");?></option>
			<option value="2" <?php if(2==$userinfo['dinnerhall']) echo 'selected="selected"';?>><?php echo lang("convenient_transportation");?></option>
			<option value="3" <?php if(3==$userinfo['dinnerhall']) echo 'selected="selected"';?>><?php echo lang("product_and_service");?></option>
			<option value="4" <?php if(4==$userinfo['dinnerhall']) echo 'selected="selected"';?>><?php echo lang("price");?></option>
			<option value="5" <?php if(5==$userinfo['dinnerhall']) echo 'selected="selected"';?>><?php echo lang("others");?></option>
			</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("vehicle");?></TD>
<TD><div id="errorsDiv_eattraffic"></div>
<select name="eattraffic" id="eattraffic">
<option value="0"><?php echo lang('selected')?></option>  Metro/Bus/Taxi/Personal Auto/Company Car
			<option value="1" <?php if(1==$userinfo['eattraffic']) echo 'selected="selected"';?>><?php echo lang("metro");?></option>
			<option value="2" <?php if(2==$userinfo['eattraffic']) echo 'selected="selected"';?>><?php echo lang("bus");?></option>
			<option value="3" <?php if(3==$userinfo['eattraffic']) echo 'selected="selected"';?>><?php echo lang("taxi");?></option>
			<option value="4" <?php if(4==$userinfo['eattraffic']) echo 'selected="selected"';?>><?php echo lang("personal_auto");?></option>
			<option value="5" <?php if(5==$userinfo['eattraffic']) echo 'selected="selected"';?>><?php echo lang("company_car");?></option>
</TD>
</TR>
<TR>
<TD class="text"><b><?php echo lang("work_week");?></b></TD>
<TD></TD>
</TR>

<TR>
<TD class="text"><?php echo lang("lunchtimes");?></TD>
<TD><div id="errorsDiv_eatlunchtimes"></div>
<select name="eatlunchtimes" id="eatlunchtimes">
<option value="0"><?php echo lang('selected')?></option>
<?php for($i=0;$i<=5;$i++){ ?>
			<option value="<?php echo $i?>" <?php if($i==$userinfo['eatlunchtimes']) echo 'selected="selected"';?>><?php echo $i?></option>
	<?php }?>
			</select>
</TD>
</TR>

<TR>
<TD class="text"><?php echo lang("lunch_average_bill");?></TD>
<TD><div id="errorsDiv_eatlunchavgcost"></div>

<select name="eatlunchavgcost" id="eatlunchavgcost" >
					<option value="" ><?php echo lang('selected')?></option>
					<option value="1" <?php if(1==$userinfo['eatlunchavgcost']) echo 'selected="selected"';?>> &lt; 20</option>
					<option value="2" <?php if(2==$userinfo['eatlunchavgcost']) echo 'selected="selected"';?>>20-30</option>
					<option value="3" <?php if(3==$userinfo['eatlunchavgcost']) echo 'selected="selected"';?>>30-40</option>
					<option value="4" <?php if(4==$userinfo['eatlunchavgcost']) echo 'selected="selected"';?>>40-50</option>
					<option value="5" <?php if(5==$userinfo['eatlunchavgcost']) echo 'selected="selected"';?>> >50</option>

</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("order_set");?></TD>
<TD><div id="errorsDiv_eatcombo"></div>
<select name="eatcombo" id="eatcombo">
<option value="0"><?php echo lang('selected')?></option>
			<option value="1" <?php if(1==$userinfo['eatcombo']) echo 'selected="selected"';?>>Yes</option>
			<option value="2" <?php if(2==$userinfo['eatcombo']) echo 'selected="selected"';?>>No</option>
			</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("lunch_delivered");?></TD>
<TD><div id="errorsDiv_lunchdelivered"></div>
<select name="lunchdelivered" id="lunchdelivered">
<option value="0"><?php echo lang('selected')?></option>
<?php for($i=0;$i<=5;$i++){ ?>
			<option value="<?php echo $i?>" <?php if($i==$userinfo['lunch_delivered']) echo 'selected="selected"';?>><?php echo $i?></option>
	<?php }?>	</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("dinnertimes");?></TD>
<TD><div id="errorsDiv_eatdinnertimes"></div>
<select name="eatdinnertimes" id="eatdinnertimes">
<option value="0"><?php echo lang('selected')?></option>
<?php for($i=0;$i<=5;$i++){ ?>
			<option value="<?php echo $i?>" <?php if($i==$userinfo['eatdinnertimes']) echo 'selected="selected"';?>><?php echo $i?></option>
	<?php }?>
			</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("dinner_average_bill");?></TD>
<TD><div id="errorsDiv_eatdinneravgcost"></div>
<select name="eatdinneravgcost" id="eatdinneravgcost" >
					<option value="" ><?php echo lang('selected')?></option>
					<option value="1" <?php if(1==$userinfo['eatdinneravgcost']) echo 'selected="selected"';?>> &lt; 30</option>
					<option value="2" <?php if(2==$userinfo['eatdinneravgcost']) echo 'selected="selected"';?>>30-60</option>
					<option value="3" <?php if(3==$userinfo['eatdinneravgcost']) echo 'selected="selected"';?>>60-100</option>
					<option value="4" <?php if(4==$userinfo['eatdinneravgcost']) echo 'selected="selected"';?>>100-150</option>
					<option value="5" <?php if(5==$userinfo['eatdinneravgcost']) echo 'selected="selected"';?>> >150</option>

</select>
</TD>
</TR>

<TR>
<TD class="text"><b><?php echo lang("weekends");?></b></TD>
<TD></TD>
</TR>

<TR>
<TD class="text"><?php echo lang("to_restaurant_on_weekends");?></TD>
<TD><div id="errorsDiv_eatweekdaytimes"></div>
<select name="eatweekdaytimes" id="eatweekdaytimes">
<option value="0"><?php echo lang('selected')?></option>
<?php for($i=0;$i<=5;$i++){ ?>
			<option value="<?php echo $i?>" <?php if($i==$userinfo['eatweekdaytimes']) echo 'selected="selected"';?>><?php echo $i?></option>
	<?php }?>
			</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("average_lunch_bill_on_weekends") ;?></TD>
<TD><div id="errorsDiv_eatweekdaylunchavgcost"></div>
<select name="eatweekdaylunchavgcost" id="eatweekdaylunchavgcost" >
					<option value="" ><?php echo lang('selected')?></option>
					<option value="1" <?php if(1==$userinfo['eatweekdaylunch_avgcost']) echo 'selected="selected"';?>> &lt; 30</option>
					<option value="2" <?php if(2==$userinfo['eatweekdaylunch_avgcost']) echo 'selected="selected"';?>>30-60</option>
					<option value="3" <?php if(3==$userinfo['eatweekdaylunch_avgcost']) echo 'selected="selected"';?>>60-100</option>
					<option value="4" <?php if(4==$userinfo['eatweekdaylunch_avgcost']) echo 'selected="selected"';?>>100-150</option>
					<option value="5" <?php if(5==$userinfo['eatweekdaylunch_avgcost']) echo 'selected="selected"';?>> >150</option>

</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("average_dinner_bill_on_weekends") ;?></TD>
<TD><div id="errorsDiv_eatweekdaydinneravgcost"></div>
<select name="eatweekdaydinneravgcost" id="eatweekdaydinneravgcost" >
					<option value="" ><?php echo lang('selected')?></option>
					<option value="1" <?php if(1==$userinfo['eatweekdaydinner_avgcost']) echo 'selected="selected"';?>> &lt; 30</option>
					<option value="2" <?php if(2==$userinfo['eatweekdaydinner_avgcost']) echo 'selected="selected"';?>>30-60</option>
					<option value="3" <?php if(3==$userinfo['eatweekdaydinner_avgcost']) echo 'selected="selected"';?>>60-100</option>
					<option value="4" <?php if(4==$userinfo['eatweekdaydinner_avgcost']) echo 'selected="selected"';?>>100-150</option>
					<option value="5" <?php if(5==$userinfo['eatweekdaydinner_avgcost']) echo 'selected="selected"';?>> >150</option>

</select>
</TD>
</TR>
<TR>
<TD class="text"><?php echo lang("meals_delivered");?></TD>
<TD><div id="errorsDiv_mealdelivered"></div>
<select name="mealdelivered" id="mealdelivered">
<option value="0"><?php echo lang('selected')?></option>
<?php for($i=0;$i<=4;$i++){ ?>
			<option value="<?php echo $i?>" <?php if($i==$userinfo['meal_delivered']) echo 'selected="selected"';?>><?php echo $i?></option>
	<?php }?>			</select>
</TD>
</TR>
<!--


<TR>
<TD class="text"><?php echo lang("your_interest");?></TD>
<TD><div id="errorsDiv_interests"></div><INPUT class="input" type="text" name="interests" id="interests" value="<?php echo $userinfo['interests']?>" /></TD>
</TR>


-->

  <tr>
    <td class="text">&nbsp;</td>

    <td><br />
          <br />
          <input name="button3" type="submit" class="btn" id="button3" value="<?php echo lang('save')?>" />
    </td>
  </tr>
</table>
<?php }?>
<?php if($type=='payment'){ ?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="regInfo">
<TR>
<TD width="40%" class="text"></TD>
<TD width="60%"><div id="msg" style="margin:0 auto;"></div></TD>
</TR>
<TR>
<TD class="text"><?php echo lang('alipay_account');?>：</TD>
<TD><div id="errorsDiv_alipay"></div><INPUT class="input" type="text" name="alipay" id="alipay" value="<?php echo $userinfo['alipay']?>" /></TD>
</TR>
<TR>
<TD class="text"><?php echo lang('alipay_realname');?>：</TD>
<TD><div id="errorsDiv_alipayrealname"></div><INPUT class="input" type="text" name="alipayrealname" id="alipayrealname" value="<?php echo $userinfo['alipayrealname']?>" /></TD>
</TR>
<TR>
<TD class="text"><?php echo lang('or');?></TD>
<TD></TD>
</TR>

<TR>
<TD class="text"><?php echo lang('bank_name');?>：</TD>
<TD><div id="errorsDiv_bankname"></div><INPUT class="input" type="text" name="bank_name" id="bank_name" value="<?php echo $userinfo['bank_name']?>" /></TD>
</TR>
<TR>
<TD class="text"><?php echo lang('sub_branch_name');?>：</TD>
<TD><div id="errorsDiv_subbank_name"></div><INPUT class="input" type="text" name="subbank_name" id="subbank_name" value="<?php echo $userinfo['subbank_name']?>" /></TD>
</TR>
<TR>
<TD class="text"><?php echo lang('bank_account');?>：</TD>
<TD><div id="errorsDiv_alipay"></div><INPUT class="input" type="text" name="bank_account" id="bank_account" value="<?php echo $userinfo['bank_account']?>" /></TD>
</TR>
<TR>
<TD class="text"><?php echo lang('account_name');?>：</TD>
<TD><div id="errorsDiv_alipay"></div><INPUT class="input" type="text" name="bank_realname" id="bank_realname" value="<?php echo $userinfo['bank_realname']?>" /></TD>
</TR>
<TR>
<TD class="text"></TD>
<TD><?php echo lang('paynote');?></TD>
</TR>
  <tr>
    <td class="text">&nbsp;</td>

    <td><br />
          <br />
          <input name="button4" type="submit" class="btn" id="button4" value="<?php echo lang('save')?>" />
   </td>
  </tr>
</table>

<?php }?>
<?php if($type=='upload'){ ?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="regInfo">
<TR>
<TD width="30%" class="text"></TD>
<TD width="70%"><div id="msg" style="margin:0 auto;"></div></TD>
</TR>
<TR>
<TD class="text">&nbsp;</TD>
<TD><div id="errorsDiv_face"></div><img src="/public/upload/faceimg/<?php echo $userinfo['face_img']?>">
  <br />
  <br />
  <br />
<INPUT type="file" name="face" id="face" class="input" />(<?php echo lang('file_attachment')?>
</TD>
</TR>

  <tr>
    <td class="text">&nbsp;</td>

    <td><br />
          <br />
          <input name="button5" type="submit" class="btn" id="button5" value="<?php echo lang('save')?>" />
    </td>
  </tr>
</table>

<?php }?>
</form>


<SCRIPT>
//only for test purposes
function checkOnSubmit(formName, r) {
   // document.getElementById(yav_config.errorsdiv).className = '';
   // document.getElementById(yav_config.errorsdiv).style.display = 'none';
   // var alertType = document.getElementById('alertType').value;
   var t = $("t").value;
    if (yav.performCheck(formName, r, 'inline')) {

    	if(t=='upload'){
    		return true;
    	}
    	var url = "<?php echo $www_site_url?>/index.php";
		var params = mini.form.serialize($(formName));
		$("msg").innerHTML = "请稍等...";
		mini.ajax.post(url, function(r){

			var r = eval('(' + r + ')');
			if(r.s==200){
				$("msg").innerHTML = r.m;
				//window.location.href = r.d;
			}
			if(r.s==400){
				//$('msg').innerHTML = r.m;
				alert(r.m);
			}
		}, params);

    	return false;

    }
    return false;
}

var rules=new Array();
//rules[0]='realname|required|<?php echo lang('realnamerule')?>';
rules[0]='mobile|required|<?php echo lang('required');?>';
rules[1]='mobile|regexp|^1\\d{10}$|请正确的手机号码';
rules[2]='area|required|<?php echo lang('required');?>';
rules[3]='area|required|<?php echo lang('required');?>';
rules[4]='birthdateyear|required|<?php echo lang('required');?>';
rules[5]='maritalstatus|required|<?php echo lang('required');?>';
rules[6]='nationality|required|<?php echo lang('required');?>';
rules[7]='occupation|required|<?php echo lang('required');?>';
rules[8]='householdincome|required|<?php echo lang('required');?>';
rules[9]='education|required|<?php echo lang('required');?>';
rules[10]='havecar|required|<?php echo lang('required');?>';
rules[11]='hearabout|required|<?php echo lang('required');?>';


//yav.addHelp('realname', '<?php echo lang('realnamerule')?>');
yav.addHelp('mobile', '');
yav.addHelp('city', '');
yav.addHelp('area', '');
yav.addHelp('birthdateyear', '');
yav.addHelp('maritalstatus', '');
yav.addHelp('nationality', '');
yav.addHelp('occupation', '');
yav.addHelp('householdincome', '');
yav.addHelp('education', '');
yav.addHelp('havecar', '');
yav.addHelp('hearabout', '');

var captchaOK = 2;  // 2 - not yet checked, 1 - correct, 0 - failed
// a simple ajax implementation

function changeCode() {
	var num = 	new Date().getTime();
	var rand = Math.round(Math.random() * 10000);
	num = num + rand;
	document.getElementById("codeimg").src = "<?php echo $www_site_url?>/index.php/identifycode/generate/" + num;
	return false;
}
window.onload = function(){
	yav.init('editform', rules);
}
</SCRIPT>
  </div>
</div>

<?php include_once("footer.html")?>
